//
// NeL - bindings
// Copyright (C) 2010 Naush
//
//This program is free software: you can redistribute it and/or modify
//it under the terms of the GNU Affero General Public License as
//published by the Free Software Foundation, either version 3 of the
//License, or (at your option) any later version.
//
//This program is distributed in the hope that it will be useful,
//but WITHOUT ANY WARRANTY; without even the implied warranty of
//MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
//GNU Affero General Public License for more details.
//
//You should have received a copy of the GNU Affero General Public License
//along with this program.  If not, see <http://www.gnu.org/licenses/>.
package org.ryzom.nel.misc;

public class ICommandsHandler {
  private long swigCPtr;
  protected boolean swigCMemOwn;

  public ICommandsHandler(long cPtr, boolean cMemoryOwn) {
    swigCMemOwn = cMemoryOwn;
    swigCPtr = cPtr;
  }

  public static long getCPtr(ICommandsHandler obj) {
    return (obj == null) ? 0 : obj.swigCPtr;
  }

  protected void finalize() {
    delete();
  }

  public synchronized void delete() {
    if (swigCPtr != 0) {
      if (swigCMemOwn) {
        swigCMemOwn = false;
        nelmiscJNI.delete_ICommandsHandler(swigCPtr);
      }
      swigCPtr = 0;
    }
  }

  public void registerCommandsHandler() {
    nelmiscJNI.ICommandsHandler_registerCommandsHandler(swigCPtr, this);
  }

  public void unregisterCommandsHandler() {
    nelmiscJNI.ICommandsHandler_unregisterCommandsHandler(swigCPtr, this);
  }

  public String getCommandHandlerClassName() {
    return nelmiscJNI.ICommandsHandler_getCommandHandlerClassName(swigCPtr, this);
  }

  public String getCommandHandlerName() {
    return nelmiscJNI.ICommandsHandler_getCommandHandlerName(swigCPtr, this);
  }

  public void fillCommandsHandlerList(SWIGTYPE_p_std__mapT_std__string_NLMISC__TCommandHandlerInfo_t commandList) {
    nelmiscJNI.ICommandsHandler_fillCommandsHandlerList(swigCPtr, this, SWIGTYPE_p_std__mapT_std__string_NLMISC__TCommandHandlerInfo_t.getCPtr(commandList));
  }

  public boolean execute(String rawCommandString, String commandName, Vector_String args, CLog log, boolean quiet, boolean human) {
    return nelmiscJNI.ICommandsHandler_execute__SWIG_0(swigCPtr, this, rawCommandString, commandName, Vector_String.getCPtr(args), args, CLog.getCPtr(log), log, quiet, human);
  }

  public boolean execute(String rawCommandString, String commandName, Vector_String args, CLog log, boolean quiet) {
    return nelmiscJNI.ICommandsHandler_execute__SWIG_1(swigCPtr, this, rawCommandString, commandName, Vector_String.getCPtr(args), args, CLog.getCPtr(log), log, quiet);
  }

}
